#!/usr/bin/perl

use warnings;
use strict;

my @names = qw(Nick Susan Chet Dolly Bill);
($names[1], $names[2]) = qw(Ellie Beatrice);
delete $names[4];
@names = (@names , qw{Lewis Lzzy});
shift @names;
@names = reverse @names;
unshift (@names, "Archive");
@names = sort @names;

my $i = 0;
foreach (@names) {
    if ($_ eq "Chet") {
        $names[$i] = q(Christian);
    }
    if ($_ eq "Dolly") {
        $names[$i] = q(Daniel);
    }
    $i++;
}

print @names;
